<?php echo $this->load->view($configs->clayout.'/admin/cabecalho'); ?>
<?php echo $this->load->view($configs->clayout.'/menu'); ?>
<div id="colTwo">
	<h2>Editar Itens de Menu</h2>
	
	<?php echo form_open('admin/submenussave'); ?>

	<p>Menu
		<?php echo form_dropdown('idmenus', $menusedt, $submenu_edt->idmenus).br(); ?>
	</p>
	<p>Titulo
		<?php echo $this->validation->titulo_error; ?>
		<?php echo form_input('titulo', $submenu_edt->mititulo).br(); ?>
		<script type="text/javascript">
		document.forms[0].titulo.focus();
		</script>
	</p>
	<p>Ordem
		<?php echo $this->validation->ordem_error; ?>
		<?php echo form_input('ordem', $submenu_edt->miordem).br(); ?>
	</p>
	<p>Link
		<?php echo $this->validation->link_error; ?>
		<?php switch ($tipolink) {
			case "noticias":
			echo form_dropdown('link', $noticias);
			break;
			
			case "paginas":
			echo form_dropdown('link', $paginas);
			break;
			
			default:
			echo form_input('link', $submenu_edt->milink);
			break;
		}
		 ?>
		 <a href="<?php echo site_url("/admin/submenusedit/".$submenu_edt->idmenusitens); ?>" >Url</a>
		 <a href="<?php echo site_url("/admin/submenusedit/".$submenu_edt->idmenusitens."/noticias"); ?>" >Noticia</a> 
		 <a href="<?php echo site_url("/admin/submenusedit/".$submenu_edt->idmenusitens."/paginas");  ?>" >Pagina</a>
	</p>
	<p>Abrir em
		<?php echo form_dropdown('target', array( '_self' => 'Na Mesma Janela', '_blank' => 'Em Nova Janela'), $submenu_edt->mitarget).br(); ?>
	</p>
	<?php echo form_hidden('acao','editar'); ?>
	<?php echo form_hidden('id', $submenu_edt->idmenusitens); ?>
	<?php echo form_hidden('tipolink',$tipolink); ?>
	<?php echo form_submit('salvar','Salvar'); ?>
	<input type="button" value="Voltar" onClick="javascript:history.go(-1)" >  
	<?php echo form_close(); ?>
	<?php //echo $this->validation->error_string; ?>
</div>
<?php //echo $this->load->view($configs->clayout.'/menudir'); ?>
<?php echo $this->load->view($configs->clayout.'/rodape'); ?>